Skip to content

Conversation

@joshuahannan
Copy link
Member

@joshuahannan joshuahannan commented Dec 4, 2025

Includes some performance improvements to addTransaction() to use references instead of copying and adds a calculateFee() function so that users can call that to calculate the fee instead of having to call estimate(), which is pretty costly

Comment on lines +1057 to 1060
if let priorityQueue = *slotQueue[txData.priority] {
priorityQueue[txData.id] = txData.executionEffort
slotQueue[txData.priority] = priorityQueue
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to suggest that we avoid copying the priorityQueue mapping here but it looks like we can't get an auth(Mutate) reference to the inner mapping which is unfortunate. I would think the outer authorized reference enables us to access the inner values as authorized as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I thought that would be true too, but I could see it potentially unintentionally exposing something.

@joshuahannan joshuahannan merged commit f1c2a2c into master Dec 9, 2025
2 checks passed
@joshuahannan joshuahannan deleted the josh/schedule-optimizations branch December 9, 2025 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants